<?php /* Copyright 2014 Karl R. Wilcox
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
       http://www.apache.org/licenses/LICENSE-2.0
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License. */
  
   $this->patterns[languageDB::CHARGE_NOT_ORDINARY] = array ( // Charges that can be confused with ordinaries
          array( 'cross bows?', 'weapon/crossbow' ),
          array( 'cross(es)? calvary', 'cross/calvary' ), 
          array( 'cross (greek|humetty|couped|coupee)', 'cross/greek' ), 
          array( 'cross(es)? patriarchal', 'cross/patriarchal' ), 
          array( 'cross(es)? ?of (saint|st) anthony', 'cross/tau' ), 
          array( 'cross(es)? tau', 'cross/tau' ), 
          array( 'cross(let|lets|es)? of (four|4) fusils?', 'quadrate/cross-4fusils' ), 
          array( 'cross(let|lets|es)? of (nine|9) fusils?', 'quadrate/cross-9fusils' ), 
          array( 'cross(es)? avellane', 'quadrate/cross-avellane' ), 
          array( 'cross(es)? bott?onn?(ee|y)', 'quadrate/cross-botonny' ), 
          array( 'cross(es)? trefle', 'quadrate/cross-botonny' ), 
          array( 'cross(let|lets|es)? cercelee?s?', 'quadrate/cross-cercele' ), 
          array( 'cross(let|lets|es)? clech(y|e|ee)', 'quadrate/cross-cleche' ), 
          array( 'cross(let|lets|es)? urd(y|e|ee)', 'quadrate/cross-cleche' ), 
          // TODO is the pattee version a separate cross?
          array( 'cross(es)? crosslet crossed ?patt(ee|y)', 'quadrate/cross-crosslet-crossed' ), 
          // TODO is recoursy a seprate cross?
          array( 'cross(es)? crosslets? ?recoursy', 'quadrate/cross-crosslet' ), 
          array( 'cross(let|lets|es)? florettys?', 'quadrate/cross-floretty' ), 
          array( 'cross(let|lets|es)? (flory|fleuronny) of (nine|9) fusils?', 'quadrate/cross-flory-9fusils' ), 
          array( 'cross(let|lets|es)? (flory|fleuronny) of (one|1) lozenge', 'quadrate/cross-flory-lozenge' ), 
          array( 'cross(let|lets|es)? florys?', 'quadrate/cross-flory' ), 
          array( 'cross(let|lets|es)? fleuronny?', 'quadrate/cross-flory' ), 
          array( 'cross(let|lets|es)? (formee|patt?ee?)', 'quadrate/cross-formy' ), 
          array( 'cross(let|lets|es)? (formy|patt?y)', 'quadrate/cross-formy' ), 
          array( 'cross(let|lets|es)? fourche', 'quadrate/cross-fourche' ), 
          array( 'cross(let|lets|es)? (molines?|ancre|anchory)', 'quadrate/cross-moline' ), 
          array( 'cross(let|lets|es)? patonces?', 'quadrate/cross-patonce' ), 
          array( 'cross(let|lets|es)? pat?t(y|e) floretty', 'quadrate/cross-paty-floretty' ), 
          array( 'cross(let|lets|es)? pat?t(e|y) pointed', 'quadrate/cross-paty-pointed' ), 
          array( 'cross(let|lets|es)? pointed', 'quadrate/cross-pointed' ), 
          array( 'cross(let|lets|es)? (ve|u)rd(y|e|ee)', 'quadrate/cross-pointed' ), 
          array( 'cross(let|lets|es)? champaine', 'quadrate/cross-pointed' ), 
          array( 'cross(let|lets|es)? pommes?', 'quadrate/cross-pomme' ), 
          array( 'cross(es)? potent crossed', 'quadrate/cross-potent-crossed' ), 
          array( 'cross(es)? poten(t|ce)', 'quadrate/cross-potent' ), 
          array( 'cross(let|lets|es)? recercell?e?(e|y)', 'quadrate/cross-recercele' ), 
          array( 'cross(let|lets|es)? moline voided', 'quadrate/cross-recercele' ), 
          array( 'cross(let|lets|es)? sarcell(ee|y)', 'quadrate/cross-sarcelly' ), 
          array( 'cross(es)? potent rebated', 'quadrate/fylfot' ), 
          array( 'cross(es)? gammadions?', 'quadrate/fylfot' ), 
          array( 'cross(let|lets|es)? of (8|eight|huit) points', 'quadrate/maltese-cross' ), 
        );
   
   $this->patterns[languageDB::CHARGE] = array (
      // cross
      array ( 'calvary cross(es)?', 'cross/calvary' ),
      array ( 'greek cross(es)?', 'cross/greek' ),
      array ( 'taus? ?cross(es)?', 'cross/tau' ),
      array ( 'paternoster cross(es)?', 'cross/paternoster' ),
      array ( 'portate cross(es)?', 'cross/portate' ),
      array ( '(latin|long|passion) cross(es)?', 'cross/long' ),
      // human
      array ( 'falconers?', 'human/falconer' ),
      array ( 'maidens?', 'human/maiden' ),
      array ( 'englishm[ae]ns?', 'human/englishman' ),
      array ( 'egyptians?', 'human/egyptian' ),
      array ( '?(human|body) hearts?', 'human/heart' ),
      array ( '?human arms?', 'human/arm' ),
      array ( 'boys?', 'human/boy' ),
      array ( '(blacka)?moors?', 'human/blackamoor' ),
      array ( 'saracens?', 'human/saracen' ),
      array ( '(wild|wood|savage) m[ae]ns?', 'human/savage' ),
      array ( '?sh(in|ank) bones?', 'human/bone' ),
      array ( 'chevaliers?', 'human/chevalier' ),
      array ( '(main|hand)s?', 'human/hand' ),
      array ( '(mort|skull)s?', 'human/skull' ),
      array ( '?human legs?', 'human/leg' ),
      array ( '?human f(oo|ee)t', 'human/foot' ),
      array ( 'askers?', 'human/asker' ),
      array ( 'lock of ?* hair', 'human/hair' ),
      // ship
      array ( 'lymphads?', 'ship/lymphad' ),
      array ( 'oars?', 'ship/oars' ),
      array ( '?# ?masted (ship|galley)s?', 'ship/galley' ),
      array ( 'anchors?', 'ship/anchor' ),
      array ( '?lighter boats?', 'ship/boat' ),
      // game animals
      array ( '(sanglier|boar|grice)s?', 'game/boar' ),
      array ( '(roe)?bucks?', 'game/buck' ),
      array ( 'fawns?', 'game/fawn' ),
      array ( 'deers?', 'game/deer' ),
      array ( 'hinds?', 'game/hind' ),
      array ( '(rabbit|hare|coney|leveret)s?', 'game/hare' ),
      array ( '(doe|hart)s?', 'game/hart' ),
      array ( 'stags?', 'game/stag' ),
      array ( 'elks?', 'game/elk' ),
      // livestock 
      array ( '(asse?|mule)s?', 'livestock/ass' ),
      array ( 'cows?', 'livestock/cow' ),
      array ( 'cal(f|ves)', 'livestock/calf' ),
      array ( 'goats?', 'livestock/goat' ),
      array ( 'ox(en)?', 'livestock/ox' ),
      array ( 'rams?', 'livestock/ram' ),
      array ( 'sheep?', 'livestock/sheep' ),
      array ( 'bulls?', 'livestock/bull' ),
      array ( 'apree?s?', 'livestock/ox' ),
      array ( '(nag|horse)s?', 'livestock/horse' ),
      array ( 'hens?', 'livestock/hen' ),
      array ( '?dunghill cocks?', 'livestock/cock' ),
      array ( 'gamecocks?', 'livestock/cock' ),
      array ( '(moor|heath)cocks?', 'livestock/cock' ),
      // dogs
      array ( 'greyhounds?', 'dog/greyhound' ),
      array ( '(talbot|hound)s?', 'dog/hound' ),
      array ( 'dogs?', 'dog/dog' ),
      array ( 'alan[dt]s', 'dog/mastiff' ),
      // Wildlife
      array ( '(badger|brock|gray)s?', 'wildlife/badger' ),
      array ( 'cats? ?a ?mountains?', 'wildlife/cat' ),
      array ( 'mountain cats?', 'wildlife/cat' ),
      array ( 'fox(es)?', 'wildlife/fox' ),
      array ( '(hedgehog|urcheon|urchin)s?', 'wildlife/hedgehog' ),
      array ( '(weasel|mart[ie]n|foine|ermine|genet)s?', 'wildlife/weasel' ),
      array ( 'squirrels?', 'wildlife/squirrel' ),
      array ( 'wol(f|ve)s?', 'wildlife/wolf' ),
      array ( 'bats?', 'wildlife/bat' ),
      array ( 'rats?', 'wildlife/rat' ),
      array ( '(rere|flitter)(mouse|mice)', 'wildlife/bat' ),
      array ( '(rere|flitter) (mouse|mice)', 'wildlife/bat' ),
      array ( 'beavers?', 'wildlife/beaver' ),
      array ( 'bears?', 'wildlife/bear' ),
      array ( 'mol(diwarp|e)s?', 'wildlife/mole' ),
      array ( 'bears? and ragged staffs?', 'wildlife/bear-ragged-staff' ),
      array ( 'otters?', 'wildlife/otter' ),
      array ( 'reindeers?', 'wildlife/reindeer' ),
      // Exotic (but lifelike) animals
      array ( 'lynxe?s?', 'animal/lynx' ),
      array ( 'antelopes?', 'animal/antelope' ),
      array ( 'ibex(es)?', 'animal/antelope' ),
      array ( 'bengal t[iy]gers?', 'animal/bengal-tiger' ),
      array ( 'elephants?', 'animal/elephant' ),
      array ( 'leopards?', 'animal/leopard' ),
      array ( 'lions? leopardes', 'animal/leopard' ),
      array ( 'lions?', 'animal/lion' ),
      array ( 'lioncels?', 'animal/lioncel' ),
      array ( 't(i|y)gers?', 'animal/tiger' ),
      array ( '?scaly lizards?', 'animal/lizard' ),
      array ( 'springboks?', 'animal/springbok' ),
      array ( 'scorpions?', 'animal/scorpion' ),
      array ( '(asp|snake|serpent)s?', 'animal/snake' ),
      array ( 'panthers?', 'animal/panthers' ),
      array ( 'camels?', 'animal/camel' ),
      array ( 'camelopards?', 'animal/giraffe' ),
      // waterfowl
      array ( '?(magellan|barnacle) g(oo|ee)se', 'waterfowl/goose' ),
      array ( '?white (smew|nun)', 'waterfowl/smew' ),
      array ( 'sheldrakes', 'waterfowl/sheldrake' ),
      array ( 'shoveller', 'waterfowl/shoveller' ),
      array ( 'cygnets?', 'waterfowl/cygnet' ),
      array ( 'herons?', 'waterfowl/heron' ),
      array ( 'swans?', 'waterfowl/swan' ),
      // raptors
      array ( '(all?erion|erne|eaglet?)?s?', 'raptor/eagle' ),
      array ( '(marlion|falcon|hawk|goshawk)s?', 'raptor/falcon' ),
      array ( 'sparrow hawks?', 'raptor/falcon' ),
      array ( 'imperial eagles?', 'raptor/imperial-eagle' ),
      // sea birds
      array ( 'bitterns?', 'seabird/bittern' ),
      array ( 'liver bird', 'seabird/cormorant' ),
      array ( '?(sea|tern) (mew|gull|fowl|pewit)s?', 'seabird/sea-gull' ),
      array ( '?sea (cormorant|aylet|gannapie)s?', 'seabird/cormorant' ),
      // bird
      array ( '?birds nests?', 'bird/bird-nest' ),
      array ( 'larks?', 'bird/lark' ),
      array ( 'auks?', 'bird/auk' ),
      array ( 'robins? ?redbreasts?', 'bird/robin' ),
      array ( 'owls? ?full ?faced', 'bird/owl' ),
      array ( '?cornish choughs?', 'bird/chough' ),
      array ( 'sea swallows?', 'bird/chough' ),
      array ( 'cranes?', 'bird/crane' ),
      array ( '(crow|corbie|daw|rook|raven)s?', 'bird/crow' ),
      array ( '(colomb|dove)s?', 'bird/dove' ),
      array ( 'stock doves?', 'bird/dove' ),
      array ( 'moorcocks?', 'bird/moorcock' ),
      array ( 'm[ea]rtlett?e?s?', 'bird/martlett' ),
      array ( 'merlions?', 'bird/martlett' ),
      array ( '(peacock|pawne)s?', 'bird/peacock' ),
      array ( 'pelicans?', 'bird/pelican' ),
      array ( '(papegay|popinjay)s?', 'bird/popinjay' ),
      array ( 'ostriche?s?', 'bird/ostrich' ),
      array ( 'ostriche?s? feathers?', 'bird/ostrich-feathers' ),
      array ( 'swallows?', 'bird/swallow' ),
      array ( 'storks?', 'bird/stork' ),
      array ( 'parrots?', 'bird/parrot' ),
      array ( '(chaffinche?|pinson)s?', 'bird/chaffinch' ),
      array ( 'bull?finche?s?', 'bird/bullfinch' ),
      array ( 'blackbirds?', 'bird/blackbird' ),
      array ( '?black birds?', 'bird/blackbird' ), // generic bird
      array ( '(snipe|curlew|avocetta)s?', 'bird/snipe' ),
      // swords
      array ( 'kni[fv]es?', 'sword/knife' ),
      array ( 'misericordes?', 'sword/knife' ),
      array ( 'claymores?', 'sword/claymore' ),
      array ( '?rondel daggers?', 'sword/dagger' ),
      array ( 'dirks?', 'sword/dagger' ),
      array ( 'ske[ia]ne?s?', 'sword/dagger' ),
      array ( 'falchions?', 'sword/falchion' ),
      array ( 'rapiers?', 'sword/rapier' ),
      array ( 'sabres?', 'sword/sabre' ),
      array ( 'crooked swords?', 'sword/sabre' ),
      array ( 'scim(i|e)tars?', 'sword/sabre' ),
      array ( 'cutlasse?s?', 'sword/sabre' ),
      array ( 'seaxe?s?', 'sword/seax' ),
      array ( 'hilts?', 'sword/hilt' ),
      array ( '?arming swords? ?of ?(st|saint) ?paul', 'sword/sword' ),
      array ( '(2|two) handed swords?', 'sword/sword' ),
      // hand projectile weapons
      array ( '(musket|pistol|potgun)s?', 'projectile/musket' ),
      array ( 'pot guns?', 'projectile/musket' ),
      array ( 'darts?', 'projectile/dart' ),
      array ( 'tridents?', 'projectile/trident' ),
      array ( 'javelins?', 'projectile/javelin' ),
      array ( '(quarrel|arrow)s?', 'projectile/arrow' ),
      array ( 'b(e|o)sons?', 'projectile/boson' ),
      array ( 'bird bolts?', 'projectile/boson' ),
      array ( '(f|ph)eons?', 'projectile/pheon' ),
      array ( '?tilting spears?', 'projectile/spear' ),
      array ( 'broad arrows?', 'projectile/broad-arrow' ),
      // heavy weapons
      array ( '(field|chamber) pieces?', 'heavy-weapon/cannon' ),
      array ( '(culverin|gun|chamber|cannon)s?', 'heavy-weapon/cannon' ),
      array ( '(swee?pe?|balista|mangonel)s?', 'heavy-weapon/balista' ),
      array ( 'battering rams?', 'heavy-weapon/battering-ram' ),
      // other weapons
      array ( 'maces?', 'weapon/mace' ),
      array ( '?(long|string) bows?', 'weapon/bow' ),
      array ( '(g|c)altraps?', 'weapon/caltrap' ),
      array ( 'cheval traps?', 'weapon/caltrap' ),
      array ( '?spiked clubs?', 'weapon/club' ),
      array ( 'crampets?', 'weapon/crampet' ),
      array ( 'cronels?', 'weapon/cronel' ),
      array ( 'crossbows?', 'weapon/crossbow' ),
      array ( 'staffs?|bourdons?', 'weapon/staff' ),
      array ( 'ragged staffs?', 'weapon/staff-ragged' ),
      array ( 'arba?l[ea]sts?', 'weapon/crossbow' ),
      array ( 'bourdons?', 'weapon/staff-palmer' ),
      array ( 'palmers staffs?', 'weapon/staff-palmer' ),
      array ( '[ck]atherine wheels?', 'weapon/catherine-wheel' ),
      array ( 'sword chapes?', 'weapon/sword-chape' ),
      // tools
      array ( 'flo(at|te)s?', 'tools/float' ),
      array ( 'woodbills?', 'tools/billhook' ),
      array ( '?wood bills?', 'tools/billhook' ),
      array ( '?hand barrows?', 'tools/barrow' ),
      array ( 'astrolabes?', 'tools/astrolabe' ),
      array ( '?(carpenter|joiner|mason)s? squares?', 'tools/square' ),
      array ( 'cables?', 'tools/cable' ),
      array ( 'nails?', 'tools/nail' ),
      array ( 'needles?', 'tools/needle' ),
      array ( '?tailors bodkins?', 'tools/bodkin' ),
      array ( 'mallets?', 'tools/mallet' ),
      array ( 'awls?', 'tools/awl' ),
      array ( 'keys?', 'tools/key' ),
      array ( 'angles', 'tools/angles' ),
      array ( '?smiths anvils?', 'tools/anvil' ),
      array ( '(barnacles|brey)s?', 'tools/brey' ),
      array ( 'compass(es?)', 'tools/compass' ),
      array ( 'brackets?', 'tools/bracket' ),
      array ( 'soldering irons?', 'tools/soldering-iron' ),
      array ( 'grappling irons?', 'tools/grappling-iron' ),
      array ( '(hammer|martell)s?', 'tools/hammer' ),
      array ( 'hemp (break|bracke)s?', 'tools/hemp-break' ),
      array ( 'flax breakers?', 'tools/hemp-break' ),
      array ( 'hackles?', 'tools/hemp-break' ),
      array ( 'mill (rind|iron)s?', 'tools/millrind' ),
      array ( 'fers? de molines?', 'tools/millrind' ),
      array ( 'ink moline', 'tools/millrind' ),
      array ( '(fetter|pad)locks?', 'tools/padlock' ),
      array ( 'shac?k(le)?bolts?', 'tools/padlock' ),
      array ( 'shac?k(le)? bolts?', 'tools/padlock' ),
      array ( '?scaling ladders?', 'tools/ladder' ),
      array ( '?sets? ?of (balanc|scal)es?', 'tools/scales' ),
      array ( 'scythes?', 'tools/scythe' ),
      array ( 'bills? ?hooks?', 'tools/billhook' ),
      array ( 'woodbills?', 'tools/billhook' ),
      array ( 'rods? of aesculapius', 'tools/rod-aesculapius' ),
      array ( 'chains?', 'tools/chain' ),
      array ( 'beetles?', 'tools/beetle' ),
      array ( 'stone bills?', 'tools/wedge' ),
      array ( 'wedges?', 'tools/wedge' ),
      array ( '?digging (iron|spade|shovel)s? ?irons', 'tools/spade' ),
      array ( '(flea?g?me?|lancet)s', 'tools/fleam' ),
      // sea life
      array ( 'e?scallops? ?shells?', 'sealife/scallop' ),
      array ( 'clams? ?shells?', 'sealife/scallop' ),
      array ( 'co(ckle|quel)? ?shells?', 'sealife/scallop' ),
      array ( 'lions? poissons?', 'sealife/sealion' ),
      array ( 'whelk shells?', 'sealife/whelk' ),
      array ( '(turbot|sole|flook|flounder|bret|birt|carter)(fish)?s? ?fish', 'sealife/turbot' ),
      array ( 'cod(fishes)? ?fish(es)?', 'sealife/codfish' ),
      array ( 'fish(es)?', 'sealife/fish' ),
      array ( '(luce|ged)s?', 'sealife/pike' ),
      array ( '(lobster|crevice)s?', 'sealife/lobster' ),
      array ( 'barbels?', 'sealife/barbel' ),
      array ( 'shrimps?', 'sealife/shrimp' ),
      array ( 'dolphins?', 'sealife/dolphin' ),
      array ( 'eels?', 'sealife/eel' ),
      array ( 'herrings?', 'sealife/herring' ),
      array ( '(salmon|trout)', 'sealife/salmon' ),
      array ( 'hippocamp(i|us)', 'sealife/seahorse' ),
      array ( 'barbels?', 'sealife/barbel' ),
      array ( 'roache?s?', 'sealife/roach' ),
      array ( 'crabs?', 'sealife/crab' ),
      array ( 'seals?', 'sealife/seal' ),
      array ( '?sea pyes?', 'sealife/pye'), // as in ABBENDON
      array ( 'sea urchins?', 'sealife/sea-urchin' ),
      // helmets
      array ( '?knights helm(et)?s?', 'helm/knight' ),
      array ( 'morions?', 'helm/morion' ),
      array ( 'steel caps?', 'helm/morion' ),
      array ( 'caps? of steel', 'helm/morion' ),
      array ( 'bas([sc]i)?nets?', 'helm/morion' ),
      array ( 'heaumes?', 'helm/knight' ),
      array ( 'esquires? helm(et)?s?', 'helm/esquire' ),
      array ( 'coif de mailles', 'helm/hood' ),
      array ( 'burgonett?e?s?', 'helm/burgonet' ),
      // armour
      array ( 'cou(te|diere)s?', 'armour/coute' ),
      array ( 'garde bras', 'armour/coute' ),
      array ( 'chamfrons?', 'armour/chamfron' ),
      array ( '(cuirass|breastplat)e?s?', 'armour/cuirass' ),
      array ( '(coute|coudiere)s?', 'armour/coutes' ),
      array ( 'cuisses', 'armour/cuisses' ),
      array ( 'epaulieres?', 'armour/epaulieres' ),
      array ( 'genouillieres', 'armour/genouillieres' ),
      array ( 'gorgets?', 'armour/gorget' ),
      array ( 'guiges?', 'armour/guige' ),
      array ( 'ha(u|w)berks?', 'armour/hawberk' ),
      array ( 'gauntlets?', 'armour/gauntlet' ),
      array ( 'spurs', 'armour/spur' ),
      array ( '?spur (rouelle|rowel|molet)s?', 'armour/rowel' ),
      array ( '(es)?carbuncles?', 'armour/carbuncle' ),
      array ( 'charbocles?', 'armour/carbuncle' ),
      array ( 'banners?', 'armour/banner' ),
      array ( '(bou?teroll|scabbard)s', 'armour/scabbard' ),
      // named-roundel
      array ( '[sc]er[ui]ses?', 'named-roundel/torteau' ),
      array ( '(tale|beza)nts?', 'named-roundel/bezant' ),
      array ( 'golpes?', 'named-roundel/golpe' ),
      array ( 'wounds?', 'named-roundel/golpe' ),
      array ( 'guzes?', 'named-roundel/guze' ),
      array ( 'hurts?', 'named-roundel/hurt' ),
      array ( 'oranges?', 'named-roundel/orange' ),
      array ( 'pellets?', 'named-roundel/pellet' ),
      array ( 'gunstones?', 'named-roundel/pellet' ),
      array ( 'ogress(es)?', 'named-roundel/pellet' ),
      array ( 'plates?', 'named-roundel/plate' ),
      array ( 'pom[mi]es?', 'named-roundel/pomme' ),
      array ( 'torteaux?', 'named-roundel/torteau' ),
      // quadrate
      array ( 'fylfots?', 'quadrate/fylfot' ),
      array ( 'maltese cross(let|lets|es)?', 'quadrate/maltese-cross' ),
      array ( 'compass roses?', 'quadrate/compass-rose' ),
      array ( 'compass stars?', 'quadrate/compass-rose' ),
      array ( 'novae?', 'quadrate/compass-rose' ),
      array ( '?plain crosslets?', 'quadrate/crosslet' ),
      // insect
      array ( 'snails?', 'insect/snail' ),
      array ( 'gadfl(ies|y)', 'insect/gadfly' ),
      array ( 'silkworm fl(y|ies)', 'insect/silkworm-fly' ),
      array ( 'gadbees?', 'insect/gadbee' ),
      array ( 'grasshoppers?', 'insect/grasshopper' ),
      array ( 'ants?', 'insect/ant' ),
      array ( 'bees?', 'insect/bee' ),
      array ( 'butterfl(y|ies)', 'insect/butterfly' ),
      array ( 'crickets?', 'insect/cricket' ),
      array ( 'hornets?', 'insect/hornet' ),
      array ( 'spiders?', 'insect/spider' ),
      array ( 'stag beetles?', 'insect/stag-beetle' ),
      // trees and fruit
      array ( 'ashen keys?', 'tree/ashen-key' ),
      array ( 'mulberry?', 'tree/mulberry' ),
      array ( 'barberry?', 'tree/barberry' ),
      array ( 'maples?', 'tree/maple' ),
      array ( 'bays?', 'tree/bay' ),
      array ( 'willows?', 'tree/willow' ),
      array ( '(cypress|cedar)', 'tree/cedar' ),
      array ( 'apples?', 'tree/apple' ),
      array ( 'birch(es)?', 'tree/birch' ),
      array ( 'pomegranates?', 'tree/pomegranate' ),
      array ( 'almond', 'tree/almond' ),
      array ( '?mountain (rowan|rodey|ash)', 'tree/ash' ),
      array ( 'hazel', 'tree/hazel' ),
      array ( 'palm', 'tree/palm' ),
      array ( 'whitethorns?', 'tree/whitethorn' ),
      array ( 'alderberr(y|ies)', 'tree/alderberry' ),
      array ( 'aspens?', 'tree/aspen' ),
      array ( '(pine|fir)s?', 'tree/fir' ),
      array ( 'trees?', 'tree/tree' ),
      array ( '(stock|trunk)s? of ?a trees?', 'tree/trunk' ),
      array ( '(bough|branche?|scrog)s?', 'tree/branch' ),
      array ( 'oaktrees?', 'tree/oak' ),
      array ( 'oaks?', 'tree/oak' ),
      array ( '?china cokar', 'tree/cokar' ),
      array ( 'pears?', 'tree/pear' ),
      // flowers
      array ( 'stems? of ?a flowers?', 'flower/flower-stem' ),
      array ( 'lil(y|ies)', 'flower/lily' ),
      array ( 'bluebottles?', 'flower/bluebottle' ),
      array ( '(quintfoil|cinquefoil|fraise)s?', 'flower/cinquefoil' ),
      array ( 'columbines?', 'flower/columbine' ),
      array ( '(octo|eight)foils?', 'flower/octofoil' ),
      array ( 'double quatrefoils?', 'flower/octofoil' ),
      array ( 'quatefoils?', 'flower/quatrefoil' ),
      array ( '?damask roses?', 'flower/rose' ),
      array ( 's[ie]xfoils?', 'flower/sexfoil' ),
      array ( 'angennes?', 'flower/sexfoil' ),
      array ( 'trefoils?', 'flower/trefoil' ),
      array ( 'tudor roses?', 'flower/tudor-rose' ),
      array ( 'roses? of york', 'flower/york-rose' ),
      array ( 'roses? of lancaster', 'flower/lancaster-rose' ),
      array ( 'angennes?', 'flower/sexfoil' ),
      array ( 'bluebottles?', 'flower/cornflower' ),
      array ( 'tulips?', 'flower/tulip' ),
      // other plants

      array ( 'pine apples?', 'plant/pineapple' ),

      array ( 'pineapples?', 'plant/pineapple' ),

      array ( 'ears? of ?big (wheat|corn)', 'plant/wheat-ear' ),

      array ( '?big (wheat|corn) ears?', 'plant/wheat-ear' ),

      array ( 'beans? cods?', 'plant/bean-cod' ),

      array ( 'beans?', 'plant/bean' ),

      array ( 'pepper pods?', 'plant/pepper-pod' ),

      array ( 'rye', 'plant/rye' ),

      array ( 'bet(ony|thune)', 'plant/betony' ),

      array ( 'acorns?', 'plant/acorn' ),

      array ( '(leaf|leaves|slips?)', 'plant/leaf' ),

      array ( 'reeds?', 'plant/reed' ),

      array ( 'thistles?', 'plant/thistle' ),

      array ( 'balm', 'plant/balm' ),

      array ( 'cotton', '/plant/cotton' ),

      array ( 'vines?', 'plant/vine' ),

      // christian
      array ( 'rosar(y|ies)', 'christian/rosary' ),
      array ( 'tombstones?', 'christian/tombstone' ),
      array ( 'cherub(im)?s?', 'christian/cherub' ),
      array ( '(paschal|holy) lambs?', 'christian/paschal-lamb' ),
      array ( 'lambs? of god', 'christian/paschal-lamb' ),
      array ( 'agnus dei', 'christian/paschal-lamb' ),
      array ( 'cro[s|z]iers?', 'christian/crosier' ),
      array ( 'virgin ?mary ?(holding|and) ?the child ?jesus ?in ?her ?arms', 'christian/virgin' ),
      array ( 'madonna', 'christian/virgin' ),
      array ( 'mitres?', 'christian/mitre' ),
      array ( 'angels?', 'christian/angel' ),
      array ( '?(church|war) bells?', 'christian/church-bell' ),
      array ( 'pastoral staffs?', 'christian/staff-pastoral' ),
      array ( 'altars?', 'christian/altar' ),
      // architecture
      array ( 'portcullis?', 'architecture/portcullis' ),
      array ( '?door arch(es)?', 'architecture/arch' ),
      array ( '(cog|clock) wheels?', 'architecture/cogwheel' ),
      array ( 'cramp(oon)?s?', 'architecture/cramp' ),
      array ( 'cramp irons?', 'architecture/cramp' ),
      array ( 'crampirons?', 'architecture/cramp' ),
      array ( 'mill wheels?', 'architecture/millwheel' ),
      array ( 'towers?', 'architecture/tower' ),
      array ( 'water wheels?', 'architecture/waterwheel' ),
      array ( 'waterwheels?', 'architecture/waterwheel' ),
      array ( 'gates?', 'architecture/gate' ),
      array ( 'gate(way|house)s?', 'architecture/gatehouse' ),
      array ( 'fountains?', 'architecture/fountain' ),
      array ( 'wells?', 'architecture/well' ),
      array ( 'bridges?', 'architecture/bridge' ),
      array ( 'castles?', 'architecture/castle' ),
      array ( '(column|pillar)s?', 'architecture/pillar' ),
      // geometric
      array ( '(file|lam?bel)', 'geometric/label' ),
      array ( 'gastells?', 'geometric/gastell' ),
      array ( 'ragules?', 'geometric/ragule' ),
      array ( 'annulets?', 'geometric/annulet' ),
      array ( '?bounding box(es)?', 'geometric/bbox' ),
      array ( '?stone billets? ?carved', 'geometric/billet' ),
      array ( 'cartouches?', 'geometric/cartouche' ),
      array ( 'crescents?', 'geometric/crescent' ),
      array ( 'del(f|ves)', 'geometric/delf' ),
      array ( '?steel (block|gad|cube)s?', 'geometric/delf' ),
      array ( 'escut?cheons? ?of ?pretence', 'geometric/escutcheon' ),
      array ( 'socheons?', 'geometric/escutcheon' ),
      array ( 'heraldic fountains?', 'geometric/fountain' ),
      array ( 'sykes?', 'geometric/fountain' ),
      array ( 'fusils?', 'geometric/fusil' ),
      array ( 'go?uttes?', 'geometric/goutte' ),
      array ( 'icicles?', 'geometric/icicle' ),
      array ( 'locks? of hair', 'geometric/icicle' ),
      array ( 'lozenges?', 'geometric/lozenge' ),
      array ( 'mascles?', 'geometric/mascle' ),
      array ( 'm(o|u)ll?ets?', 'geometric/mullet' ),
      array ( 'astroids?', 'geometric/mullet' ),
      array ( 'round(el|le)s?', 'geometric/roundel' ),
      array ( 'rustres?', 'geometric/rustre' ),
      array ( 'saltorels?', 'geometric/saltorel' ),
      array ( 'triangles?', 'geometric/triangle' ),
      // axe
      array ( 'lochaber axes?', 'axe/lochaber-axe' ),
      array ( 'pole axes?', 'axe/pole-axe' ),
      array ( '(poleaxe|halbert)s?', 'axe/pole-axe' ),
      array ( 'addices?', 'axe/addice' ),
      array ( 'carpenters? axes?', 'axe/addice' ),
      array ( 'battle axes?', 'axe/battle-axe' ),
      array ( 'battleaxes?', 'axe/battle-axe' ),
      array ( '?common axes?', 'axe/common-axe' ),
      array ( 'hatchets?', 'axe/common-axe' ),
      array ( '(miners|pick) axes?', 'axe/pick-axe' ),
      array ( 'hews?', 'axe/pick-axe' ),
      array ( 'turners? axes?', 'axe/turner-axe' ),
      // natural
      array ( '(hill|hillock|mound|mount)', 'natural/hillock' ),
      array ( 'mole hills?', 'natural/mole-hill' ),
      array ( 'molehills?', 'natural/mole-hill' ),
      array ( 'water bubbles?', 'natural/bubble' ),
      array ( 'clouds?', 'natural/cloud' ),
      array ( 'waves? of the sea', 'natural/sea-waves' ),
      array ( 'hursts?', 'natural/hurst' ),
      // celestial
      array ( '?full moons?', 'celestial/moon-full' ),
      array ( 'increscents?', 'celestial/moon-inc' ),
      array ( 'decrescents?', 'celestial/moon-dec' ),
      array ( 'crescents?', 'celestial/crescent' ),
      array ( '(star|es?toile?)s?', 'celestial/star' ),
      array ( '# pointed (star|es?toile?)s?', 'celestial/star' ),
      array ( 'suns?', 'celestial/sun' ),
      array ( 'sunbursts?', 'celestial/sunburst' ),
      array ( 'rainbows?', 'celestial/rainbow' ),
      array ( 'thunderbolts?', 'celestial/thunderbolt' ),
      // clothes
      array ( '?(antique|dutch|mens) (sham)?(brogue|brough|boot)s?', 'clothes/boot', ),
      array ( '?electoral bonnet', 'clothes/bonnet' ),
      array ( '?square buckles?', 'clothes/buckle' ),
      array ( 'belts?', 'clothes/belt' ),
      array ( 'ferma(il|ux)', 'clothes/buckle' ),
      array ( 'arming buckles?', 'clothes/arming-buckle' ),
      array ( 'caps? ?of ?dignity', 'clothes/cap-dignity' ),
      array ( 'ducipers?', 'clothes/cap-dignity' ),
      array ( '(chapeaux?|capelots?)', 'clothes/chapeau' ),
      array ( 'caps? of (estate|maintenance)', 'clothes/chapeau' ),
      array ( '?gem rings?', 'clothes/gem-ring' ),
      array ( 'gloves?', 'clothes/glove' ),
      array ( '(sleeve|mau?nche?)s?', 'clothes/maunche' ),
      array ( '?mans garters?', 'clothes/garter' ),
      array ( '(purse|scrip)s?', 'clothes/purse' ),
      // mythical / stylised creatures
      array ( 'deer goats?', 'livestock/deer-goat' ),
      array ( 'lion goats?', 'livestock/lion-goat' ),
      array ( 'camelopardels?', 'mythical/giraffe-horned' ),
      array ( 'unicorns?', 'mythical/unicorn' ),
      array ( 'sphinx(es)?', 'mythical/sphinx' ),
      array ( 'man lions?', 'mythical/man-lion' ),
      array ( 'opinic(i|us)', 'mythical/opinicus' ),
      array ( 'man tigers?', 'mythical/man-tiger' ),
      array ( 'manticores?', 'mythical/man-tiger' ),
      array ( 'musimons?', 'mythical/musimon' ),
      array ( 'enfields?', 'mythical/enfield' ),
      array ( 'harpys?', 'mythical/harpy' ),
      array ( 'pythons?', 'mythical/python' ),
      array ( 'amphiptere', 'mythical/amphiptere' ),
      array ( 'tritons?', 'mythical/triton' ),
      array ( 'bagwyns', 'mythical/bagwyn' ),
      array ( 'w[yi]vern?s?', 'mythical/wyvern' ),
      array ( '(calopuss?|chatloups?)', 'mythical/calopus' ),
      array ( '(centaurs?|sagittarius|sagittary)', 'mythical/centaur' ),
      array ( 'chinese dragons?', 'mythical/chinese-dragon' ),
      array ( '?amphisien cockatrices?', 'mythical/cockatrice' ),
      array ( 'basilisks?', 'mythical/cockatrice' ),
      array ( 'dragons?', 'mythical/dragon' ),
      array ( 'enfields?', 'mythical/enfield' ),
      array ( '(griffin|gryphon)s?', 'mythical/griffin' ),
      array ( 'hippogriffs?', 'mythical/hippogriff' ),
      array ( 'hydras?', 'mythical/hydra' ),
      array ( 'mermaids?', 'mythical/mermaid' ),
      array ( 'merm[ea]n?', 'mythical/merman' ),
      array ( 'sirens?', 'mythical/mermaid' ),
      array ( 'phoenixe?s?', 'mythical/phoenix' ),
      array ( 'salamander', 'mythical/salamander' ),
      array ( 'petasus', 'mythical/petasus' ),
      array ( 'amphipteres?', 'mythical/winged-serpent' ),
      array ( 'yales?', 'mythical/yale' ),
      array ( 'sea dogs?', 'mythical/sea-dog' ),
      array ( 'sea horses?', 'mythical/sea-horse' ),
      array ( 'sea wol(f|ves)', 'mythical/sea-wolf' ),
      array ( 'sea lions?', 'mythical/sea-lion' ),
      array ( 'pegas(i|us)', 'mythical/pegasus' ),
      array ( 'amphisien cockatrices?', 'mythical/basilisk' ),
      array ( 'bagwyns?', 'mythical/bagwyn' ),
      array ( 'basilisks?', 'mythical/basilisk' ),
      array ( '(calopous|chatloups?)', 'mythical/wolf-horned' ),
      array ( 'melusines?', 'mythical/melusine' ),
      // utensils (and crockery)
      array ( '?water b(ou|ed)gets?', 'utensil/water-bouget' ),
      array ( 'dossers?', 'utensil/water-bouget' ),
      array ( 'flesh pots?', 'utensil/flesh-pot' ),
      array ( '?round trivets?', 'utensil/trivet' ),
      array ( 'triangular trivets?', 'utensil/triangular-trivet' ),
      array ( 'cauldrons?', 'utensil/cauldron' ),
      array ( 'chargers?', 'utensil/charger' ),
      array ( '(chalice|cup)s?', 'utensil/cup' ),
      array ( '(drinking|college|lily) (pot|cup)s?', 'utensil/cup' ),
      array ( 'covers? for ?a (pot|cup)s?', 'utensil/cup-cover' ),
      array ( '(pot|cup) covers?', 'utensil/cup-cover' ),
      array ( 'mugs?', 'utensil/mug' ),
      array ( '(ew|beak|pitch)ers?', 'utensil/ewer' ),
      array ( '(lav|wat)er pots?', 'utensil/ewer' ),
      // furnishings
      array ( '(oreiller|cushion)s?', 'furnishings/cushion' ),
      array ( 'pillows?', 'furnishings/pillow' ),
      array ( 'tables?', 'furnishings/table' ),
      array ( 'gonfanons?', 'furnishings/gonfanon' ),
      array ( 'wool[ps]acks?', 'furnishings/wool-pack' ),
      array ( 'wool [ps]acks?', 'furnishings/wool-pack' ),
      array ( '(garlands?|chaplets?|wreaths?)', 'furnishings/garland' ),
      // household
      array ( 'spindles? ?of ?silk', 'household/spindle' ),
      array ( 'bungs? ?of ?a ?tun', 'household/bung' ),
      array ( 'playing tops?', 'household/tops' ),
      array ( '(bucket|pail)s?', 'household/bucket' ),
      array ( 'cups? of acorns', 'household/cup-of-acorns' ),
      array ( 'hour glass(es)?', 'household/hourglass' ),
      array ( 'hourglass(es)?', 'household/hourglass' ),
      array ( 'crutch(es)?', 'household/crutch' ),
      array ( 'books?', 'household/book' ),
      array ( 'combs?', 'household/comb' ),
      array ( 'writing pens?', 'household/pen' ),
      array ( '(chessrook|cocke)s?', 'household/chessrook' ),
      array ( 'chess rooks?', 'household/chessrook' ),
      array ( '(hogshead|barrel|tub|tun)s?', 'household/barrel' ),
      array ( 'ladies fans?', 'household/fan-ladies' ),
      array ( 'terrestrial (globe|sphere)s?', 'household/globe' ),
      array ( 'hawks? bells?', 'household/hawkbell' ),
      array ( 'e?scrolls?', 'household/scroll' ),
      array ( 'ribbons?', 'household/ribbon' ),
      array ( '(vase|urn)s?', 'household/urn' ),
      // crown
      array ( 'antique crowns?', 'crown/antique' ),
      array ( 'triumphal crowns?', 'crown/triumphal' ),
      array ( 'papal crowns?', 'crown/papal' ),
      array ( 'obsidional crowns?', 'crown/obsidional' ),
      array ( '(astral|celestial) (crown|coronet)s?', 'crown/astral' ),
      array ( 'barons? (crown|coronet)s?', 'crown/baron' ),
      array ( 'civil crowns?', 'crown/civil' ),
      array ( '?ducal (crown|coronet)s?', 'crown/ducal' ), // default crown
      array ( 'dukes? (crown|coronet)s?', 'crown/duke' ),
      array ( 'earls? (crown|coronet)s?', 'crown/earl' ),
      array ( 'eastern (crown|coronet)s?', 'crown/eastern' ),
      array ( 'imperial crowns?', 'crown/imperial' ),
      array ( '(crown|coronet)s? of ?the king of arms', 'crown/king-of-arms' ),
      array ( 'marquiss? (crown|coronet)s?', 'crown/marquis' ),
      array ( 'mural (crown|coronet)s?', 'crown/mural' ),
      array ( 'naval (crown|coronet)s?', 'crown/naval' ),
      array ( 'palisado (crown|coronet)s?', 'crown/palisado' ),
      array ( '(crown|coronet)s? palisados?', 'crown/palisado' ),
      array ( '(royal|regal) crowns?', 'crown/royal' ),
      array ( 'saxon (crown|coronet)s?', 'crown/saxon' ),
      array ( 'vallary? (crown|coronet)s?', 'crown/vallary' ),
      array ( '(crown|coronet)s? vallary?', 'crown/vallary' ),
      array ( 'viscounts? (crown|coronet)s?', 'crown/viscount' ),
      // music
      array ( '(violin|crwth|fiddle)s?', 'music/violin' ),
      array ( 'cla[vr]i(on|cord)s?', 'music/rest' ),
      array ( 'rests?', 'music/rest' ),
      array ( 'harps?', 'music/harp' ),
      array ( 'harps? of ireland', 'music/harp-ireland' ),
      array ( '?hunting horns?', 'music/horn' ),
      array ( 'trumpets?', 'music/trumpet' ),
      // fire
      array ( 'beacons?', 'fire/beacon' ),
      array ( 'bale fires?', 'fire/beacon' ),
      array ( 'cressets?', 'fire/cresset' ),
      array ( 'fire balls?', 'fire/fireball' ),
      array ( '(fireball|bombshell|bombe?)s?', 'fire/fireball' ),
      array ( 'bomb shells?', 'fire/fireball' ),
      array ( '?hand grenado?e?s?', 'fire/fireball' ),
      array ( '(flambeaux?|torche?s?)', 'fire/torch' ),
      array ( 'fire brands?', 'fire/torch' ),
      // characters
      array ( '(numeral|number|digit|figure)s? ?of *', 'characters/digit' ),
      array ( '(letters?|text) *', 'characters/letter' ),
      array ( 'roman ?letter *', 'characters/roman' ),
      array ( 'words? *', 'characters/word' ),
      array ( '(monogram|cypher)s? *', 'characters/cypher' ),
      // farming
      array ( 'shepherds crooks?', 'farming/shepherds-crook' ),
      array ( 'windmill', 'farming/windmill' ),
      array ( 'wine press(es)?', 'farming/wine-press' ),
      array ( 'wool cards?', 'farming/woolcard' ),
      array ( 'garbs?', 'farming/corn-sheaf' ),
      array ( 'corn', 'farming/corn' ),
      array ( 'wagons?', 'farming/wagon' ),
      array ( 'wheatshea(f|ves)', 'farming/corn-sheaf' ),
      array ( 'oat shea(f|ves)', 'farming/oat-sheaf' ),
      array ( 'oatshea(f|ves)', 'farming/oat-sheaf' ),
      array ( 'winnowing fans?', 'farming/fan-winnowing' ),
      array ( 'scruttles?', 'farming/fan-winnowing' ),
      array ( '(horseshoe|ferr)s?', 'farming/horseshoe' ),
      array ( '?(wagon|cart) wheels? ?of ?# ?spokes', 'farming/spoked-wheel' ),
      array ( 'beehives?', 'farming/beehive' ),
      array ( 'shredding kni[fv]es?', 'farming/shredding-knife' ),
      // knot
      array ( 'knots?', 'knot/knot' ),
      array ( 'bourchier knots?', 'knot/bourchier' ),
      array ( 'harrington knots?', 'knot/harrington' ),
      array ( 'heanage knots?', 'knot/heanage' ),
      array ( 'ormonde knots?', 'knot/ormonde' ),
      array ( 'stafford knots?', 'knot/stafford' ),
      array ( 'wake knots?', 'knot/wake' ),
      array ( 'celtic knots?', 'knot/celtic-knot' ),
      array ( 'bowen knots?', 'knot/bowen' ),
      // special
      array ( '?of the same', 'special/same' ),
      array ( 'more ?of ?the ?same', 'special/same' ),
      array ( '(an)?others?', 'special/same' ),
      array ( 'one', 'special/same' ), // as in "a double one"
      // symbol
      array ( 'ankhs?', 'symbol/ankh' ),
      array ( '?astronomical characters? ?of ?the ?planet *', 'symbol/astronomy' ),
      array ( 'caduceus', 'symbol/caduceus' ),
      array ( 'staffs? of mercury', 'symbol/caduceus' ),
      array ( 'cornucopias?', 'symbol/cornucopia' ),
      array ( 'ermine spots?', 'symbol/ermine-spot' ),
      array ( 'spots?', 'symbol/spot' ),
      array ( 'fasces', 'symbol/fasces' ),
      array ( 'shields? of david', 'symbol/star-of-david' ),
      array ( 'fleurs? de l(y|i)s', 'symbol/fleurdelys' ),
      // jewellery / treasure
      array ( '(gemel|gimmel) ring', 'jewels/gemel-ring' ),
      array ( 'gimball', 'jewels/gemel-ring' ),
      array ( '?royal (orbs?|mounds?) ?royal', 'jewels/orb' ),
      array ( 'rub(y|ies)', 'jewels/ruby' ),
      // modern
      array ( 'aeroplanes?', 'modern/aeroplane' ),
          );
   
?>
